<?php
$data = $this->data;
if($data!=''){
   /* echo'<pre>';
        print_r($data);
    echo '</pre>';
   // die;
   */
   ?>


    <?php foreach($data as $item): ?>
        <div class="one-third column portfolio-item">
            <div class="picture"><a class="a" href="/topic/detail/<?php echo $item['topi']?>" title="<?php echo $item['title'] ?>"><img src="<?php if($item['images']!='') echo $item['images']; else echo '/upload/image/no-img.jpg';    ?>" alt="<?php echo $item['title'] ?>"/><div class="image-overlay-link"></div></a>
                <div class="item-description alt">
                    <h5>
                        <a href="/?search_type=<?php echo $item['topic_type']; ?>">[ <?php echo Velacolib\Utility\Utility::getProductType($item['topic_type']);  ?></php> ] </a>
                        <a title="<?php echo $item['title'] ?>" href="/topic/detail/<?php echo $item['topi'] ?>"><?php echo $item['title'] ?></a></h5>

                    <h6>
                        <a href="/?search_loc=<?php echo $item['topic_location']; ?>">  <?php echo Velacolib\Utility\Utility::getLocationArray($item['topic_location']); ?></a>
                        <?php if($item['tocatid']){ ?>
                            <a href="/?search_cat=<?php echo $item['tocatid']; ?>"> -  Mặc Hàng: <?php $topic_cat =  Velacolib\Utility\Utility::getTopicCat()->getCategories($item['tocatid']); echo $topic_cat->title;  ?></a>
                        <?php } ?>

                    </h6>

                    <p>
                        <?php echo $item['short_description']; ?>
                    </p>
                </div>
                <div class="post-meta">
                    <span><span style="color: #ff0000">Giá: <span class="show_price" data="<?php echo $item['show_price'] ?>"><?php echo number_format($item['price']); ?> VNÐ </span></span></span>
                    <!-- <span><i class="mini-ico-calendar"></i><?php echo date("d/m/Y", strtotime($item['create_date']));?></span>      -->
                    <span><i class="mini-ico-user"></i> <a href="/user/topic/<?php echo $item['user_id']; ?>"><?php echo Velacolib\Utility\Utility::getInfoUser($item['user_id'],'name') ; ?></a></span>

                </div>
            </div>
        </div>
    <?php endforeach;
} ?>
